package dialog.program;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;

public class Printer 
{
	public static void print_add_user_form(HttpServletResponse response)
	throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Add User:</b>" + 
			"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
			"<table>" +
			"<tr>" +
				"<td><B>Name:</B></td>" +
				"<td><input type=textbox name=name value=\"\" size=25></td><br>" +
			"</tr>" +
			"<tr>" +
				"<td><B>Address:</B></td>" +
				"<td><input type=textbox name=address value=\"\" size=25></td>" +
			"</tr>" +
			"<tr>" +
				"<td><B>Phone:</B></td>" +
				"<td><input type=textbox name=phone value=\"\" size=25></td>" +
			"</tr>" +
			"</table>" +
			"<input type=submit>" +
		"</form></center>");
	}
	public static void print_add_book_form(HttpServletResponse response)
		throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Add Book:</b>" + 
				"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
				"<table>" +
				"<tr>" +
					"<td><B>Title:</B></td>" +
					"<td><input type=textbox name=title_book value=\"\" size=25></td><br>" +
				"</tr>" +
				"<tr>" +
					"<td><B>Author:</B></td>" +
					"<td><input type=textbox name=author_book value=\"\" size=25></td>" +
				"</tr>" +
				"<tr>" +
					"<td><B>ISBN:</B></td>" +
					"<td><input type=textbox name=isbn value=\"\" size=25></td>" +
				"</tr>" +
			"</table>" +
			"<input type=submit>" +
		"</form></center>");
	}
	public static void print_add_report_form(HttpServletResponse response)
		throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Add Report:</b>" + 
				"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
				"<table>" +
				"<tr>" +
					"<td><B>Title:</B></td>" +
					"<td><input type=textbox name=title_report value=\"\" size=25></td><br>" +
				"</tr>" +
				"<tr>" +
					"<td><B>Reference:</B></td>" +
					"<td><input type=textbox name=reference value=\"\" size=25></td>" +
				"</tr>" +
				"<tr>" +
					"<td><B>Author:</B></td>" +
					"<td><input type=textbox name=author value=\"\" size=25></td>" +
				"</tr>" +
				"</table>" +
				"<input type=submit>" +
		"</form></center>");
	}
	public static void print_add_journal_form(HttpServletResponse response)
	throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Add Journal:</b>" + 
				"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
				"<table>" +
				"<tr>" +
					"<td><B>Title:</B></td>" +
					"<td><input type=textbox name=title_journal value=\"\" size=25></td><br>" +
				"</tr>" +
				"</table>" +
				"<input type=submit>" +
		"</form></center>");
	}
	public static void print_add_int_user_form(HttpServletResponse response)
	throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Add User With ID:</b>" + 
		"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
		"<table>" +
		"<tr>" +
			"<td><B>Name:</B></td>" +
			"<td><input type=textbox name=name value=\"\" size=25></td><br>" +
		"</tr>" +
		"<tr>" +
			"<td><B>Address:</B></td>" +
			"<td><input type=textbox name=address value=\"\" size=25></td>" +
		"</tr>" +
		"<tr>" +
			"<td><B>Phone:</B></td>" +
			"<td><input type=textbox name=phone value=\"\" size=25></td>" +
		"</tr>" +
		"<tr>" +
			"<td><B>ID:</B></td>" +
			"<td><input type=textbox name=id value=\"\" size=25></td>" +
		"</tr>" +
		"</table>" +
		"<input type=submit>" +
	"</form></center>");
	}
	public static void print_user_form(HttpServletResponse response)
		throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Print User:</b>" + 
				"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
				"<table>" +
				"<tr>" +
					"<td><B>User ID:</B></td>" +
					"<td><input type=textbox name=user_id value=\"\" size=25></td><br>" +
				"</tr>" +
				"</table>" +
				"<input type=submit>" +
		"</form></center>");
	}
	public static void print_book_form(HttpServletResponse response)
		throws IOException, ServletException
	{
		PrintWriter writer = response.getWriter();
		writer.println("<center><b>Print Document:</b>" + 
			"<form name=Form1 action=http://www.csf108library.appspot.com/dialog>" +
			"<table>" +
			"<tr>" +
				"<td><B>Document ID:</B></td>" +
				"<td><input type=textbox name=doc_id value=\"\" size=25></td><br>" +
			"</tr>" +
			"</table>" +
			"<input type=submit>" +
		"</form></center>");
	}
}